package com.huawei.hms.framework.network.restclient.hwhttp;

import com.huawei.hms.framework.network.restclient.hwhttp.trans.FileBinary;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import javax.annotation.Nullable;

class RequestBody$5 extends RequestBody {
    final /* synthetic */ MediaType val$contentType;
    final /* synthetic */ File val$file;

    RequestBody$5(MediaType mediaType, File file) {
        this.val$contentType = mediaType;
        this.val$file = file;
    }

    public byte[] body() {
        return new byte[0];
    }

    @Nullable
    public String contentType() {
        return this.val$contentType == null ? null : this.val$contentType.toString();
    }

    public void writeTo(OutputStream outputStream) throws IOException {
        new FileBinary(this.val$file).onWriteBinary(outputStream);
    }

    public long contentLength() {
        return this.val$file.length();
    }
}
